import react from 'react';
import { Route, Switch, Redirect } from 'react-router-dom'
import Users from '../pages/blogs/users';
import Blogs from '../pages/blogs/blogs'
import Login from '../pages/book/login'
import Book from '../pages/book/book'

const RouterView = () => {
  return <Switch>
    <Route path="/users" component={Users}/>
    <Route path="/blogs" component={Blogs}/>

    <Route path="/login" component={Login}/>
    <Route path="/book" component={Book}/>
    <Redirect from='/' to='/users' />
  </Switch>
}

export default RouterView;
